<template>
	<view class="Card-box">
		<view class="card" v-for="(e,i) in list" :key="i">
			<view class="info">
				<u-avatar :src="e.headImage||''" style="margin-right: 16rpx;"></u-avatar>
				<view>
					<view class="name">
						{{e.username||''}}
					</view>
					<view class="subTag">
						<text>{{e.sextext}}</text>
						<u-line direction="col" length="32rpx" margin="2rpx 20rpx" color="#898989"></u-line>
						<text>{{e.workeAge||''}}年</text>
						<u-line direction="col" length="32rpx" margin="2rpx 20rpx" color="#898989"></u-line>
						<text>{{e.jobtext}}</text>
					</view>
					<view class="subPrice">
						<text>{{e.hourFee||''}}元/小时</text>
						<u-line direction="col" length="32rpx" margin="2rpx 20rpx" color="#646464"></u-line>
						<text>{{e.dailyFee||''}}元/天</text>
					</view>
				</view>
			</view>
			<view class="employBtn" @click="employTo(e)">
				雇佣
			</view>
		</view>
	</view>
	
</template>

<script setup lang="ts">
	import {
		useRouter
	} from 'uni-mini-router'
	let props = defineProps({
		list:{
			type: Array, // 类型
			default:()=>[]// 默认值
		},
		showcompnay:{
			type: Boolean, // 类型
			default: true // 默认值
		},
		pageType:{
			type: String, // 类型
			default: '' // 默认值
		},
	})
	
	const router = useRouter()
	const employTo = (e) => {
		router.push({
			name: "employWorkerDetils",
			params: {
				id:e.id
			}
		})
	}

</script>

<style lang="scss" scoped>
	.Card-box{
		height:100%;
		overflow-y: auto;
		
	}
	.card {
		background-color: rgb(250, 250, 251);
		height: 250rpx;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		
		
		margin:0 24rpx 24rpx;
		// margin: 30rpx auto;
		padding: 30rpx 20rpx;
		background:#fff;
		border-radius: 24rpx;
		box-shadow: 8rpx 8rpx 32rpx 0rpx rgba(0, 0, 0, 0.04);
		
	
		.info {
			margin: 0 20rpx;
			display: flex;
			align-items: flex-start;
			;
	
			.name {
				font-size: 36rpx;
				font-weight: 900;
			}
	
			.subTag {
				display: flex;
				font-size: 24rpx;
				color: rgb(137, 137, 137);
				margin: 24rpx 0;
			}
	
			.subPrice {
				display: flex;
				color: rgb(100, 100, 100);
				font-size: 26rpx;
			}
		}
	
		.employBtn {
			background-color: #CB645E;
			color: #fff;
			height: 74rpx;
			font-size: 30rpx;
			line-height: 74rpx;
			width: 155rpx;
			border-radius: 14rpx;
			text-align: center;
			margin: 0 20rpx;
			transform: translateY(-40rpx);
		}
	}
</style>